﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace FigureDraw
{
    public class EcllipShape : CommonShape
    {

        public EcllipShape(StorageDevice sd)
            : base(sd)
        {

        }
        public override void DrawToDevice(Form form)
        {
            this.KhoiTaoTruocKhiVe();
            int width = EndPoint.X - BeginPoint.X;
            int height = EndPoint.Y - BeginPoint.Y;
            int tamX = BeginPoint.X + width / 2;
            int tamY = BeginPoint.Y + height / 2;
            StorageDevice.drawEllipse(tamX, tamY, width, height);
            //StorageDevice.drawEllipse(200, 200, 45, 45);
        }
    }
}